package com.momo.auth.pojo;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;
import java.util.List;

@Getter
@Setter
public class User extends org.springframework.security.core.userdetails.User {

    public Long id;

    public String sex;

    public String phone;

    public User(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }

    public User(String username,String password, Collection<? extends GrantedAuthority> authorities, String sex, String phone, Long id){
        super(username,password,authorities);
        this.sex = sex;
        this.phone = phone;
        this.id = id;
    }

    public User(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
    }

    public User(){
        super("","",false,false,false,false,null);
    }

}
